package org.example.demo.config;


    //配置mybatis-plus的分页插件


import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Date;

/**
 * @author LJM
 * @create 2022/4/15
 * 配置mybatis-plus提供的分页插件拦截器
 */

@Configuration
public class MybatisPlusConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }


    @Bean
    public ISqlInjector sqlInjector() {//逻辑删除功能
        return new LogicSqlInjector();

    }

}



